package com.hss.test

import java.lang.Integer.parseInt

/**
 * Created by Administrator on 2017/6/5.
 */
class LiuCheng {
}

fun main(args:Array<String>){
    var x : Int = 30;
//    when(x){
//        1,3->{
//            print("x == 1 || x = 3")
//        }
//        2->{
//            print("x == 2")
//        }
//        else->{
//            print("x is neither 1 nor 2")
//        }
//    }

//    var s = "20"
//    when (x) {
//        parseInt(s) -> print("s encodes x")
//        else -> print("s does not encode x")
//    }

//    when(x){
//        in 1..10->{print("x is in the range")}
////        in validNumbers -> print("x is valid")
//        !in 10..20 -> print("x is outside the range")
//    }

//    val hasPrefix = when(x) {
//        is Int -> println("x == Int  type")
//        else -> false
//    }


}
